import axios from '@/utils/api'
import {reactive} from "vue"
import { useUserInfoStore } from '@/store/modules/user_info/index';
const user_infoStore = useUserInfoStore();
const user_info = reactive(user_infoStore.userInfo)
export const useGetGameUrl = async (game_id) => {
    const res = await axios.get('/getGameUrl?game_id='+game_id+'&user_id='+user_info.id)
    if(res.code === 200){
        return res.data
    }else{
        return res
    }
}